/// <reference path="../utilities/Xpcom.js" />
///--------------------------------------------------------------------
/// <file name="NAMFoxToolbar.js">
///   Provides logic for the NAMFox about dialog.
/// </file>
///--------------------------------------------------------------------

with (NAMFox) {

var NAMFoxAbout = {
    openUrl: function(url) {
        /// <summary>
        ///   Emulates a hyperlink by providing the functionality
        ///   to navigate to a URL.
        /// </summary>
        /// <param name="url">
        ///   The URL to open.
        /// </param>
        
        var windowMediator = $("@mozilla.org/appshell/window-mediator;1").service("nsIWindowMediator");
        var parentWindow = windowMediator.getMostRecentWindow("navigator:browser");
        
        if (parentWindow) {
            parentWindow.content.document.location.href = url;
            
            window.close();
        }
    }
};

};